/*
 * @(#)FactWriter.java 1.0 2000/12/14
 * 
 * Copyright 2000 Thomas Barnekow. All Rights Reserved.
 * 
 * This software is the proprietary information of Thomas Barnekow. Use is
 * subject to license terms.
 */

package jessx.provider;

import jess.*;
import tb.util.*;

/**
 * A <i>FactWriter</i> stores Jess <i>Fact</i> s persistently and deletes
 * <i>Fact</i> s that have been stored persistently.
 * 
 * @author Thomas Barnekow
 * @version 1.0
 */
public interface FactWriter extends FactReader {

	/**
	 * Store a Jess <i>Fact</i> persistently.
	 * 
	 * @param entityName
	 *            name of persistent entity, e.g., a database table
	 * @param fact
	 *            Jess fact to be stored persistently
	 * @param context
	 *            Jess context
	 */
	public Fact assertFact(
		QualifiedName entityName,
		Fact fact,
		Context context)
		throws JessException;

	/**
	 * Delete a Jess <i>Fact</i> from persistent storage.
	 * 
	 * @param entityName
	 *            name of persistent entity, e.g., a database table
	 * @param fact
	 *            Jess fact to be deleted from persistent storage
	 * @param context
	 *            Jess context
	 */
	public Fact retract(QualifiedName entityName, Fact fact, Context context)
		throws JessException;
}